from datetime import datetime

now=datetime.now()
print(now.strftime("%Y-%m-%dT%H:%M:%S.000Z"))
# 2019-01-18T09:09:18.000Z